Coverage Report

Created: 2021-08-28 18:14

D:\git\skunkworks\herald-for-cpp\herald\include\herald\device.h
Line
Count
Source
1
//  Copyright 2020-2021 Herald Project Contributors
2
//  SPDX-License-Identifier: Apache-2.0
3
//
4
5
#ifndef HERALD_DEVICE_H
6
#define HERALD_DEVICE_H
7
8
#include "datatype/target_identifier.h"
9
#include "datatype/time_interval.h"
10
11
#include <optional>
12
13
namespace herald {
14
15
using namespace herald::datatype;
16
17
///
18
/// \brief Generic abstraction of a particular local proximate device type.
19
/// 
20
/// Could be a Bluetooth Low Energy device (BLEDevice) or some other technology.
21
/// 
22
/// Only implemented in final version to allow TimeInterval and other
23
/// potentially platform specific implementation details to be overridden.
24
///
25
/// \sa herald::ble::BLEDevice
26
///
27
class Device {
28
public:
29
140
  Device() = default;
30
140
  virtual ~Device() = default;
31
32
  // virtual Date created() const = 0;
33
  virtual TimeInterval timeIntervalSinceLastUpdate() const = 0;
34
  virtual const TargetIdentifier& identifier() const = 0;
35
  virtual void identifier(const TargetIdentifier& toCopyFrom) = 0;
36
};
37
38
}
39
40
#endif